<template>
  <info-item title="参与者">
    <div class="meeting-members">
      <div
        v-for="(member,index) in members"
        :key="member.userId"
      >
        <div
          class="member-box"
          :title="member.userName"
        >
          <img
            class="member-avatar"
            :src="member.avatar"
          />
          <div
            class="member-name"
            :class="index===0?'member-founder':''"
          >
            {{member.userName}}
          </div>
        </div>
      </div>
    </div>
  </info-item>
</template>

<script>
import InfoItem from '../InfoItem'
export default {
  name: 'MeetingMembers',
  components: {
    InfoItem
  },
  props: {
    members: {
      type: Array,
      default: () => []
    }
  }
}
</script>

<style lang="scss" scoped>
.meeting-members {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  .label {
    font-size: 18px;
    font-weight: bold;
  }
  .member-box {
    margin: 10px 10px 0 10px;
    text-align: center;
    // cursor: pointer;
    .member-avatar {
      width: 60px;
      height: 60px;
      border-radius: 50%;
      display: block;
      margin-bottom: 5px;
    }
    .member-name {
      font-size: 14px;
      width: 60px;
      overflow: hidden;
      white-space: nowrap;
      text-overflow: ellipsis;
    }
    .member-founder {
      color: orange;
    }
  }
}
</style>
